<?php global $theme_options, $suvi; ?>
<?php get_header(); ?>
	<div id="leftColTop">
		<div id="leftColTopInner">
			<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('WpNewspaper_1') ) : ?>
			<h3 class="breakingNews"><?php echo $theme_options["titleBreakingNews"]; ?></h3>
			<ul>
				<?php $latest = get_posts('category=21&numberposts='.$theme_options["breakingNewsPostCount"]); foreach( $latest as $post ): ?>
				<li><strong>&raquo; <?php the_time('H:i') ?></strong> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
				<?php endforeach ?>
			</ul>
			<?php endif; ?>
			
			<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('WpNewspaper_2') ) : ?>
			<?php endif; ?>
		</div>
	</div><!-- enf od Left Col Top -->
	
	<div id="featuredWrapper">
		<?php $featuredPost = new WP_Query();$featuredPost->query('showposts=1&cat='.$theme_options["featuredCatID"]); ?>
		<?php while ($featuredPost->have_posts()) : $featuredPost->the_post(); ?>	
		<h2 id="featuredTitle">«<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>»</h2>
		<div id="featuredPost">
			<img src="<?php viva('NewsFea','1'); ?> " alt="<?php the_title(); ?>" />
			<p><?php print string_limit_words(get_the_excerpt(), 55); ?>...</p>
			<span class="featuredDetails"><?php the_time('F j Y') ?> / <?php comments_popup_link(__($newspaper["noComment"]), __($newspaper['comment1']), __($newspaper['comments']));?> / <a href="<?php the_permalink() ?>" rel="bookmark"><?php echo $newspaper["readMore"]; ?> &raquo;</a></span>
		</div>
		<?php endwhile; wp_reset_query(); ?>	
		
		<div id="otherFeaturedPosts">
			<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('WpNewspaper_3') ) : ?>
			<?php $otherFeaturedPost = new WP_Query();$otherFeaturedPost->query('showposts=3&cat='.$theme_options["featuredCatID"].'&offset=1'); ?>
			<?php while ($otherFeaturedPost->have_posts()) : $otherFeaturedPost->the_post(); ?>	
			<div class="innerPost">
				<h2 class="innerPostTitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
				<p><?php print string_limit_words(get_the_excerpt(), 19); ?>...</p>
				<span class="featuredDetails"><?php the_time('F j Y') ?> / <?php comments_popup_link(__($newspaper["noComment"]), __($newspaper['comment1']), __($newspaper['comments']));?> / <a href="<?php the_permalink() ?>" rel="bookmark"><?php echo $newspaper["readMore"]; ?> &raquo;</a></span>
			</div>
			<?php endwhile; ?>
			<?php wp_reset_query(); ?>
			<?php endif; ?>
		</div>
		<div class="clear"></div>
		<div id="ad728">
			<?php include (TEMPLATEPATH . '/ADmainPage728x90.php'); ?>
		</div>
	</div><div class="clear"></div> <!-- End of Wrapper -->
	
	<?php if($theme_options['enablePhotoGallery'] == 1) { ?>
	<div id="slidingBar">
		<div id="gallery">
			<ul>
				<?php $featuredPost = new WP_Query();$featuredPost->query('cat='.$theme_options["mpPhotoGalCatID"].'&showposts=7'); ?>
				<?php while ($featuredPost->have_posts()) : $featuredPost->the_post(); ?>
				<li><a class="highslide" onclick="return vz.expand(this)" href="<?php viva('NewsPGMPHov','6'); ?>"><img src="<?php viva('NewsPGMP','7'); ?>" alt="<?php the_title(); ?>" /></a><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
				<?php endwhile; ?>
				<?php wp_reset_query(); ?>	
			</ul><div class="clear"></div>
		</div>
	</div>
	<?php } ?>
	
	<div id="subNews">
		<div class="subNewsContainer">
			<div class="subNewsInner">
				<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('WpNewspaper_4') ) : ?>
				<?php $bottomFirst = new WP_Query();$bottomFirst->query('showposts=1&cat='.$theme_options["sub1stCatID"]); ?>
				<?php while ($bottomFirst->have_posts()) : $bottomFirst->the_post(); ?>	
					<h2 class="titleSubNews"><?php echo get_cat_name($theme_options["sub1stCatID"]); ?></h2>
					<h2 class="subnewsEntryTitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
					<p><?php print string_limit_words(get_the_excerpt(), 33); ?>...</p>
					<span class="subNewsContainerMeta"><?php the_time('M j, Y') ?> / <a href="<?php the_permalink() ?>" rel="bookmark"><?php echo $newspaper["rMore"]; ?> &raquo;</a></span>
					<img src="<?php viva('NewsBot','2'); ?>" alt="<?php the_title(); ?>" />
				<?php endwhile; ?>
				<?php wp_reset_query(); ?>
				<?php endif; ?>
			</div>
		</div>
		
		<div class="subNewsContainer">
			<div class="subNewsInner">
				<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('WpNewspaper_5') ) : ?>
				<?php $bottomSecond = new WP_Query();$bottomSecond->query('showposts=1&cat='.$theme_options["sub2ndCatID"]); ?>
				<?php while ($bottomSecond->have_posts()) : $bottomSecond->the_post(); ?>	
					<h2 class="titleSubNews"><?php echo get_cat_name($theme_options["sub2ndCatID"]); ?></h2>
					<h2 class="subnewsEntryTitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
					<p><?php print string_limit_words(get_the_excerpt(), 33); ?>...</p>
					<span class="subNewsContainerMeta"><?php the_time('M j, Y') ?> / <a href="<?php the_permalink() ?>" rel="bookmark"><?php echo $newspaper["rMore"]; ?> &raquo;</a></span>
					<img src="<?php viva('NewsBot','3'); ?>" alt="<?php the_title(); ?>" />
				<?php endwhile; ?>
				<?php wp_reset_query(); ?>
				<?php endif; ?>
			</div>
		</div>
		
		<div class="subNewsContainer">
			<div class="subNewsInner">
				<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('WpNewspaper_6') ) : ?>
				<?php $bottomThird = new WP_Query();$bottomThird->query('showposts=1&cat='.$theme_options["sub3rdCatID"]); ?>
				<?php while ($bottomThird->have_posts()) : $bottomThird->the_post(); ?>	
					<h2 class="titleSubNews"><?php echo get_cat_name($theme_options["sub3rdCatID"]); ?></h2>
					<h2 class="subnewsEntryTitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
					<p><?php print string_limit_words(get_the_excerpt(), 33); ?>...</p>
					<span class="subNewsContainerMeta"><?php the_time('M j, Y') ?> / <a href="<?php the_permalink() ?>" rel="bookmark"><?php echo $newspaper["rMore"]; ?> &raquo;</a></span>
					<img src="<?php viva('NewsBot','4'); ?>" alt="<?php the_title(); ?>" />
				<?php endwhile; ?>
				<?php wp_reset_query(); ?>
				<?php endif; ?>
			</div>
		</div>
		
		<div class="subNewsContainer subnewsNoMargin">
			<div class="subNewsInner">
				<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('WpNewspaper_7') ) : ?>
				<?php $bottomFourth = new WP_Query();$bottomFourth->query('showposts=1&cat='.$theme_options["sub4thCatID"]); ?>
				<?php while ($bottomFourth->have_posts()) : $bottomFourth->the_post(); ?>	
					<h2 class="titleSubNews"><?php echo get_cat_name($theme_options["sub4thCatID"]); ?></h2>
					<h2 class="subnewsEntryTitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
					<p><?php print string_limit_words(get_the_excerpt(), 33); ?>...</p>
					<span class="subNewsContainerMeta"><?php the_time('M j, Y') ?> / <a href="<?php the_permalink() ?>" rel="bookmark"><?php echo $newspaper["rMore"]; ?> &raquo;</a></span>
					<img src="<?php viva('NewsBot','5'); ?>" alt="<?php the_title(); ?>" />
				<?php endwhile; ?>
				<?php wp_reset_query(); ?>
				<?php endif; ?>
			</div>
		</div>
		<div class="clear"></div>		
	</div><!-- enf od subnews -->
	
	<div id="mainPageSidebar">
	<?php get_sidebar(); ?>
	</div><div class="clear"></div><!-- enf od mainpagesidebar -->
	
	<?php get_footer(); ?>

</div><!-- enf od wrapper -->

</body>
</html>